function showPhone(){
	var a =document.getElementById("miphone")
	document.getElementById('phone').style.borderBottom='solid 3px';
	document.getElementById('phone').style.borderBottomColor='#C7000B';
	a.style.display="block";
	a.style.opacity="1";
	a.style.transition="1s";	
}
function offPhone(){
	document.getElementById('phone').style.borderBottom='none';
	document.getElementById('phone').style.borderBottomColor='hidden';
	a.style.display='none';
	a.style.opacity="0";
	a.style.transition="0";	
}
function showRedmi(){
	document.getElementById('Redmi').style.borderBottom='solid 3px';
	document.getElementById('Redmi').style.borderBottomColor='#C7000B';
	document.getElementById("miRed").style.display="block";
	document.getElementById("miRed").style.opacity="1";
	document.getElementById("miRed").style.transition="1s";	
}
function offRedmi(){
	document.getElementById('Redmi').style.borderBottom='none';
	document.getElementById('Redmi').style.borderBottomColor='hidden';
	document.getElementById('miRed').style.display='none';
	document.getElementById("miRed").style.opacity="0";
	document.getElementById("miRed").style.transition="0";	
}
function showTV(){
	document.getElementById('TV').style.borderBottom='solid 3px';
	document.getElementById('TV').style.borderBottomColor='#C7000B';
	document.getElementById("television").style.display="block";
	document.getElementById("television").style.opacity="1";
	document.getElementById("television").style.transition="1s";	
}
function offTV(){
	document.getElementById('TV').style.borderBottom='none';
	document.getElementById('TV').style.borderBottomColor='hidden';
	document.getElementById('television').style.display='none';
	document.getElementById("television").style.opacity="0";
	document.getElementById("television").style.transition="0";	
}
function showNotetable(){
	document.getElementById('notetable').style.borderBottom='solid 3px';
	document.getElementById('notetable').style.borderBottomColor='#C7000B';
	document.getElementById("miNote").style.display="block";
	document.getElementById("miNote").style.opacity="1";
	document.getElementById("miNote").style.transition="1s";	
}
function offNotetable(){
	document.getElementById('notetable').style.borderBottom='none';
	document.getElementById('notetable').style.borderBottomColor='hidden';
	document.getElementById('miNote').style.display='none';
	document.getElementById("miNote").style.opacity="0";
	document.getElementById("miNote").style.transition="0";	
}
function showHome(){
	document.getElementById('home').style.borderBottom='solid 3px';
	document.getElementById('home').style.borderBottomColor='#C7000B';
	document.getElementById("miHome").style.display="block";
	document.getElementById("miHome").style.opacity="1";
	document.getElementById("miHome").style.transition="1s";	
}
function offHome(){
	document.getElementById('home').style.borderBottom='none';
	document.getElementById('home').style.borderBottomColor='hidden';
	document.getElementById('miHome').style.display='none';
	document.getElementById("miHome").style.opacity="0";
	document.getElementById("miHome").style.transition="0";	
}
function showRouter(){
	document.getElementById('router').style.borderBottom='solid 3px';
	document.getElementById('router').style.borderBottomColor='#C7000B';
	document.getElementById("miRouter").style.display="block";
	document.getElementById("miRouter").style.opacity="1";
	document.getElementById("miRouter").style.transition="1s";	
}
function offRouter(){
	document.getElementById('router').style.borderBottom='none';
	document.getElementById('router').style.borderBottomColor='hidden';
	document.getElementById('miRouter').style.display='none';
	document.getElementById("miRouter").style.opacity="0";
	document.getElementById("miRouter").style.transition="0";	
}
function showHardware(){
	document.getElementById('hardware').style.borderBottom='solid 3px';
	document.getElementById('hardware').style.borderBottomColor='#C7000B';
	document.getElementById("miHardware").style.display="block";
	document.getElementById("miHardware").style.opacity="1";
	document.getElementById("miHardware").style.transition="1s";	
}
function offHardware(){
	document.getElementById('hardware').style.borderBottom='none';
	document.getElementById('hardware').style.borderBottomColor='hidden';
	document.getElementById('miHardware').style.display='none';
	document.getElementById("miHardware").style.opacity="0";
	document.getElementById("miHardware").style.transition="0";	
}
//轮播图的js
			var items=document.getElementsByClassName('item');
			var points=document.getElementsByClassName('point');
			var goPreBtn=document.getElementById('goPre');
			var goNextBtn=document.getElementById('goNext');
			
			var index=0;//index表示第几张图片在展示，第index张图片有active这个类名
			
			var time=0;
			var clearActive=function(){
				for(var i=0;i<items.length;i++){
					items[i].className='item';
				}
				for(var i=0;i<points.length;i++){
					points[i].className='point';
				}
			}
			var goIndex=function(){
				clearActive();
//				console.log(index);
				points[index].className='point active';
				items[index].className='item active';
			}
			var goNext=function(){
				if(index<4){
					index++;
				}else{
					index=0;
				}
				goIndex();
			}
			var goPre=function(){
				if(index==0){
					index=4;
				}else{
					index--;
				}
				goIndex();
			}
			goNextBtn.addEventListener('click',function(){
				goNext();
			})
			goPreBtn.addEventListener('click',function(){
				goPre();
			})
			for(var i=0;i<points.length;i++){
				points[i].addEventListener('click',function(){
					var pointIndex=this.getAttribute('data-index');
					index=pointIndex;
					
					goIndex();
					time=0;
				})
			}
			setInterval(function(){
				time++;
				if(time==20){
					goNext();
					time=0;
				}
			},100)
function showOuter(){
	document.getElementById('shutup').style.display='block';
	document.getElementById('shutup').style.transition='0.5s';
	document.getElementById('shutup').style.zIndex='999';
}
function closeOuter(){
	document.getElementById('shutup').style.display='none';
	document.getElementById('shutup').style.transition='0.5s';
}
//.function showHot(){
//	document.getElementById('London').style.display='block';
//	document.getElementById('Pairs').style.display='none';
//}
//.function showMovie(){
//	document.getElementById('Pairs').style.display='block';
//	document.getElementById('London').style.display='none';
//}
function showkePhone(){
		document.getElementById('erweima').style.display='block';
}
function offkePhone(){
	document.getElementById('erweima').style.display='none';
}
function showkePerson(){
	document.getElementById('percenter').style.display='block';
}
function offkePerson(){
	document.getElementById('percenter').style.display='none';
}
function showkeSever(){
	document.getElementById('aftersales').style.display='block';
}
function offkeSever(){
	document.getElementById('aftersales').style.display='none';
}
function showkeStaff(){
	document.getElementById('perstaff').style.display='block';
}
function offkeStaff(){
	document.getElementById('perstaff').style.display='none';
}
function showkeShop(){
	document.getElementById('pershopping').style.display='block';
}
function offkeShop(){
	document.getElementById('pershopping').style.display='none';
}
//底部图片
var tesu=document.getElementsByClassName("tesua")[0];
var arrlmg=["img/icon4.png","img/icon5.png"];
var i=0;
setInterval(function(){
	i++;
	if(i>=arrlmg.length){
		i=0;
		
	}
	tesu.src=arrlmg[i];
},3000);
//返回顶部的按钮
var totop=document.getElementsByClassName("totop")[0];
document.onscroll=function(){
	var top=document.documentElement.scrollTop;
	if(top>500){
		totop.style.display="block";
	}else {
		totop.style.display="none";
	}
}
function turntop(){
	var backTopTimer=setInterval(function(){
		var topH=document.documentElement.scrollTop||document.body.scrollTop;
		var backTopSpeed=Math.floor(-topH/8);
		if(topH>0){
			document.documentElement.scrollTop=document.body.scrollTop=topH+backTopSpeed;	
		}else {
			clearInterval(backTopTimer);
			
		}
	},10);
}
